home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / comm / slip_new.zip / PHONE.CMD < prev    next >
OS/2 REXX Batch file  |  1995-06-13  |  3KB  |  103 lines

  1. ###################################
  2. #
  3. #  Modem and Host Scripts V2.4.2
  4. #   Modified by John Mudge [jmudge@wln.com]
  5. #
  6. #   Changes in 2.4:
  7. #   Added script for SupraFAXModem 144LC
  8. #
  9. #   Changes in 2.4.1:
  10. #   Added script for USR Courier V32.bis 
  11. #
  12. #   Changes in 2.4.2:
  13. #   Modified script for USR Courier V32.bis to run Supra 14400
  14. #
  15. ###################################
  16. #
  17. #   Modem scripts
  18. #
  19. #  For each modem type xxx, supply script:
  20. #
  21. #      Modem.xxx.Dial         Dials the phone, waits for connection
  22. #      Modem.xxx.Hangup       Gets the modem to hang up the phone
  23. #      Modem.xxx.Status       Returns the modem's status (-1,0,1=?,no cd,cd)
  24. #
  25. ###################################
  26. #
  27. #
  28. Procedure     Modem.Supra.Dial
  29. Message   "Initializing ...."
  30. Send   'ATZ<'
  31. TimeOut   10            'Your modem is not responding, try turning it off, then on.'
  32. Reject    'ERROR'       'Your modem said "Error" to the initialization string.'
  33. Expect    'OK'          'Your modem did not say "OK".'
  34. Wait 2
  35. Message   "Dialing ...."
  36. Send    'ATDT %n<'
  37. TimeOut 60              'No connection after 1 minute.'
  38. Reject  'NO DIALTONE'   'Your modem can't get a dial tone, check phone line to modem.'
  39. Reject  'BUSY'          'The server is fully occupied.'
  40. Reject  'NO CARRIER'    'The server modem is not responding.  Try again.'
  41. Expect  'CONNECT'       'Did not get the CONNECT response.'
  42. Message        "Connected ...."
  43. EndProcedure   Modem.Supra.Dial
  44. #
  45. Procedure Modem.Supra.HangUp
  46. Flush
  47. Message        "Disconnecting ...."
  48. Wait 1
  49. Send '+++'
  50. Wait 2
  51. Flush
  52. Send 'ATH<'
  53. DTR Off
  54. Message        "Disconnected ...."
  55. EndProcedure Modem.Supra.HangUp
  56. #
  57. ###############################################
  58. #
  59. #
  60. ##############################################
  61. #
  62. #        Host Scripts
  63. #
  64. #    For each host hhh, supply two scripts:
  65. #
  66. #
  67. #      Host.hhh.Login          Logs in and goes into SLIP mode
  68. #
  69. #      Host.hhh.LogOut         Does any logout chores (often empty)
  70. #
  71. #
  72. Procedure    Host.WLN.Login
  73. TimeOut 60      'The SLIP server is not responding.'
  74. Message         'Waiting for SLIP server to respond.'
  75. Quiet ON
  76. #Expect   'Verification'
  77. #TimeOut 5
  78. Message         'SLIP server is responding.'
  79. Message         'Sending your user name and password.'
  80. Quiet OFF
  81. Expect   'Login:'
  82. Send '%u<'
  83. Expect   'Password:'
  84. Private
  85. Send '%p<'
  86. Reject    'Access denied'   'Your user name or password was not accepted.'
  87. TimeOut 30    'SLIP server did not respond to your validation request.'
  88. Expect    '==>'
  89. TimeOut 10    'SLIP server did not respond to SLIP command.'
  90. Send 'slip<'
  91. Grab MYIP
  92. Expect 'Your address is'
  93. Message 'Login to SLIP server successful.'
  94. EndProcedure   Host.WLN.Login
  95. #
  96. #
  97. #
  98. Procedure      Host.WLN.LogOut
  99. EndProcedure   Host.WLN.LogOut
  100. #
  101. #   End of Script file
  102. #
  103.